package com.zhuanzhuan.hero.user.service;

import com.bj58.zhuanzhuan.zzentry.common.service.entity.ServiceHeaderEntity;
import com.zhuanzhuan.hero.user.dto.label.CancelAuthenticatedLabelDTO;
import com.zhuanzhuan.hero.user.vo.PageResultWrapper;
import com.zhuanzhuan.hero.user.vo.UserListItemVO;
import com.zhuanzhuan.hero.user.vo.label.CertificationQualifiedVO;
import com.zhuanzhuan.hero.user.vo.label.FraternityAuthLabelVO;
import com.zhuanzhuan.hero.user.vo.label.ToAuthFraternityAuthLabelVO;
import com.zhuanzhuan.hero.user.vo.label.UserFraternityAuthLabelVO;

import java.util.List;
import java.util.Map;

/**
 * @ClassName IFraternityAuthService
 * @Description
 * @Author hanjunjun
 * @Date 2024/7/2 17:16
 */
public interface IFraternityAuthService {

    /**
     * 查询用户已绑定的的同行认证标签和被认证次数
     *
     * @param uid
     * @return java.util.List<com.zhuanzhuan.hero.user.vo.label.FraternityAuthLabelVO>
     * @author  hanjunjun
     * @date 2024/7/2
     **/
    List<FraternityAuthLabelVO> queryBoundedFraternityAuthLabels(Long uid);

    /**
     * 批量查询用户已绑定的同行认证标签
     * @param uids
     * @return
     */
    Map<Long, List<FraternityAuthLabelVO>> queryBoundedFraternityAuthLabels(List<Long> uids);
    /**
     * 新增一个标签
     *
     * @param uid
     * @param labelName
     * @return void
     * @author  hanjunjun
     * @date 2024/7/2
     **/
    UserFraternityAuthLabelVO addFraternityAuthLabel(Long uid, String labelName, ServiceHeaderEntity header);

    /**
     * 删除一个标签
     *
     * @param uid
     * @param labelId
     * @return void
     * @author  hanjunjun
     * @date 2024/7/2
     **/
    void delFraternityAuthLabel(Long uid, Long labelId);

    /**
     * 查询标签和绑定状态
     *
     * @param uid
     * @return java.util.List<com.zhuanzhuan.hero.user.vo.label.UserFraternityAuthLabelVO>
     * @author  hanjunjun
     * @date 2024/7/2
     **/
    List<UserFraternityAuthLabelVO> queryUserFraternityAuthLabels(Long uid);

    /**
     * 绑定所选标签
     *
     * @param uid
     * @param labelIds
     * @return void
     * @author  hanjunjun
     * @date 2024/7/3
     **/
    void bindFraternityAuthLabels(Long uid, List<Long> labelIds);

    /**
     * uid是否有资格给homemakerUid点同行认证
     *
     * @param uid
     * @param homemakerUid
     * @return java.lang.Boolean
     * @author  hanjunjun
     * @date 2024/7/3
     **/
    CertificationQualifiedVO hasCertificationQualified(Long uid, Long homemakerUid);

    /**
     * 客态查询  已认证过的标签和未认证的标签
     *
     * @param fromUid
     * @param toUid
     * @return com.zhuanzhuan.hero.user.vo.label.ToAuthFraternityAuthLabelVO
     * @author  hanjunjun
     * @date 2024/7/3
     **/
    ToAuthFraternityAuthLabelVO queryToAuthFraternityAuthLabel(Long fromUid, Long toUid);

    /**
     * 客态进行认证同行认证标签
     *
     * @param fromUid
     * @param toUid
     * @param labelIds
     * @return void
     * @author  hanjunjun
     * @date 2024/7/3
     **/
    void authenticatedLabels(Long fromUid, Long toUid, List<Long> labelIds);

    /**
     * 客态取消认证
     *
     * @param fromUid
     * @param cancelAuthenticatedLabelDTO
     * @return void
     * @author  hanjunjun
     * @date 2024/7/3
     **/
    void cancelAuthenticatedLabels(Long fromUid, CancelAuthenticatedLabelDTO cancelAuthenticatedLabelDTO);

    /**
     * 风控失败处理
     *
     * @param labelId
     * @param rejectedFields
     * @return boolean
     * @author  hanjunjun
     * @date 2024/7/4
     **/
    boolean riskControlFail(Long labelId, List<String> rejectedFields);

    /**
     * 给自己认证的用户列表  分页查询
     *
     * @param uid
     * @param pageNum
     * @param pageSize
     * @return com.zhuanzhuan.hero.user.vo.PageResultWrapper<com.zhuanzhuan.hero.user.vo.UserItemBriefVO>
     * @author  hanjunjun
     * @date 2024/7/6
     **/
    PageResultWrapper<UserListItemVO> queryAuthenticatedUsers(Long uid, Integer pageNum, Integer pageSize);

    /**
     * 同行认证数
     * @param uid
     * @return
     */
    Integer queryAuthenticatedNum(Long uid);

}
